<?php

require( realpath('..') . '/includes/admin.php' );

auth();
$dora->database();

if( action('add') ) {
	extract($_POST);
	$sql = "insert into article(title, sort, author, source, content) values ('$title', '$sort', '$author', '$source', '$content')";
	$dora->db->query($sql);
	
	$dora->lib('message');
	$dora->message->set('新增文章成功');
	
	$dora->view('article_fo');
	
}
else {
	$dora->view('article_add');
}

?>